<script>
$(document).ready(function()
{
    <?php 
        if (isset($notify) && $notify != "")
        {
            if ($notify == "jobboard_deactive_success") {
                $type = "success";
                $title = "Thông báo";
                $text = "Bạn đã xoá website thành công.";
                $icon = "picon icon16 brocco-icon-info white";
            } elseif ($notify == "jobboard_deactive_successwebs") {
                $type = "errorR";
                $title = "Thông báo";
                $text = "Có lỗi khi xoá Website.";
                $icon = "picon icon16 brocco-icon-info white";
            }

            ?>
            $.pnotify({
                type: '<?=$type?>',
                title: '<?=$title?>',
                text: '<?=$text?>',
                icon: '<?=$icon?>',
                opacity: 0.9,
                history: false,
                sticker: false
            });
            <?
        }
    ?>
});
</script>
<?php if (isset($jobboards)): ?>
<div class="row-fluid">
    <div class="span12">
        <div class="box gradient">
            <div class="title">
                <h4>
                    <span>Danh sách các Website</span>
                </h4>
            </div>
            <div class="content noPad clearfix">
             <a class="btn btn-info" href="<?php echo url_for('@jobboard_edit?action=add') ?>">Thêm</a>
              <table cellpadding="0" cellspacing="0" border="0" class="responsive dynamicTable display table table-bordered" width="100%">
                <thead>
                  <tr>
                    <th>
                        <span>Tên</span>
                    </th>
                    <th>
                        <span>Tên Generator</span>
                    </th>
                    <th>
                        <span>Đơn vị tiền tệ</span>
                    </th>
                    <th>
                      	<span>Tài khoản</span>
                    </th>
                    <th>
                        <span>Sản phẩm</span>
                    </th>
                    <th>
                        <span>Thương hiệu khoá</span>
                    </th>
                    <th>
                        <span>Thương hiệu đang bán</span>
                    </th>
                    <th>
                        <span>Thao tác</span>
                    </th>
                  </tr>
				</thead>
				<tbody>
				  <?php foreach ($jobboards as $jobboard): ?>
                    <tr>
                        <td style='text-align:center;'><?php echo $jobboard->name ?></td>
                        <td style='text-align:center;'><?php echo $jobboard->generator_name ?></td>
                        <td style="text-align:center"><?php echo $jobboard->Currency->code ?></td>
                        <td style="text-align:center"><a href="<?php echo url_for('@account_list?jobboard_id='.$jobboard->id) ?>">Xem</a></td>
                        <td style="text-align:center"><a href="<?php echo url_for('@product_list?jobboard_id='.$jobboard->id) ?>">Xem</a></td>
                        <td style="text-align:center"><a href="<?php echo url_for('@restriction_list?jobboard_id='.$jobboard->id) ?>">Xem</a></td>
                        <td style="text-align:center"><a href="<?php echo url_for('@marque_list?jobboard_id='.$jobboard->id) ?>">Xem</a></td>
                        <td style="text-align:center"><a href="<?php echo url_for('@jobboard_edit?jobboard_id='.$jobboard->id) ?>"><span class="icon12 icomoon-icon-pencil"></span></a><a href="<?php echo url_for('@jobboard_delete?jobboard_id='.$jobboard->id) ?>"><span class="icon12 icomoon-icon-remove"></span></a></td>
                    </tr>
                  <?php endforeach ?>
    			</tbody>
  				</table>
        	</div>
             <a class="btn btn-info" href="<?php echo url_for('@jobboard_edit?action=add') ?>">Thêm</a>
    	</div>
	</div>
</div>
<?php endif ?>